libxc: expose xsaves/xgetbv1/xsavec to hvm guest
authorShuai Ruan <shuai.ruan@intel.com>
Wed, 25 Nov 2015 16:24:17 +0000 (17:24 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 25 Nov 2015 16:24:17 +0000 (17:24 +0100)
commitc708181305621e5393b5e1ee316b6784585bdf93
tree85a573dd583901f1d29b24afcdeb2db0625dd19b
parent460b9a4b3630f03ce4f1ee24249541bdfea08fd4
libxc: expose xsaves/xgetbv1/xsavec to hvm guest

This patch exposes xsaves/xgetbv1/xsavec to hvm guest.
The reserved bits of eax/ebx/ecx/edx must be cleaned up
when call cpuid(0dh) with leaf 1 or 2..63.

According to the spec the following bits must be reserved:
For leaf 1, bits 03-04/08-31 of ecx is reserved. Edx is reserved.
For leaf 2...63, bits 01-31 of ecx is reserved, Edx is reserved.

But as no XSS festures are currently supported, even in HVM guests,
for leaf 2...63, ecx should be zero at the moment.

Signed-off-by: Shuai Ruan <shuai.ruan@intel.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxc/xc_cpuid_x86.c